import { createStore, applyMiddleware, compose  } from 'redux'
import rootReducer from './rootReducer'
import thunk from 'redux-thunk'

// 这是一个更大的容器
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;


// 创建store
const store = createStore(
  rootReducer,
  composeEnhancers( applyMiddleware(thunk))
)
export default store